# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do

  sequence :name do |n|
    "name-#{n}"
  end

  sequence :worker do |n|
    "worker-#{n}"
  end

  factory :terminal_order do
    association :terminal
    association :terminal_group
    association :terminal_user
    name TerminalOrder::ORDER_NAMES.keys.sample
    worker
    worker_phone {rand(10**9..10**10)}.to_s
    setup_at 1.days.ago.to_date
  end

end
